import request from '@/utils/requestApi'

export function uploadAndProcessFile(data) {
  return request({
    url: '/api/idea3d/upload',
    method: 'POST',
    data,
    headers: { 'Content-Type': 'multipart/form-data' },
    timeout: 300000
  })
}

export function compressBatch(data) {
  return request({
    url: '/api/idea3d/upload/batch',
    method: 'POST',
    data,
    headers: { 'Content-Type': 'multipart/form-data' },
    timeout: 600000
  })
}

export function getModelFile(user) {
  return request({
    url: '/api/idea3d/fileInfoList',
    method: 'POST',
    data: {
      user: user
    }
  })
}

export function deleteModelData(encryptedId) {
  return request({
    url: '/api/idea3d/deleteModelData',
    method: 'POST',
    data: {
      encryptedId: encryptedId
    }
  })
}

export function alterModelData(fileInfo) {
  return request({
    url: '/api/idea3d/alterModelData',
    method: 'POST',
    data: fileInfo
  })
}

export function getModelResources() {
    return request({
        url: '/api/idea3d/modelResources',
        method: 'get'
    })
}
